<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <script>
        //若是子页面,则最外层的页面跳转
        if (window != top){
            top.location.href = location.href;
        }else {
            //当前页面跳转
            window.location.href="toLogin";
        }
    </script>
</body>
</html>